package com.xxl.job.core.enums;

public enum SourceTypeEnum {

    GPU("GPU"),
    /*CONCURRENT_EXECUTION("并行"),*/
    FPGA("FPGA"),
    NPU("NPU");

    private String title;
    private SourceTypeEnum(String title){
        this.title = title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getTitle() {
        return title;
    }

    public static SourceTypeEnum match(String name, SourceTypeEnum defaultItem){
        if (name != null) {
            for (SourceTypeEnum item:SourceTypeEnum.values()) {
                if (item.name().equals(name)) {
                    return item;
                }
            }
        }
        return defaultItem;
    }
}
